<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>我的推荐</title>
    <script src="https://cdn.tailwindcss.com/3.3.3"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
        body {
            font-family: 'PingFang SC', sans-serif;
            background-color: #f5f7fa;
        }
        .recommend-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .user-item {
            transition: all 0.3s ease;
        }
        .user-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }
        .level-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: bold;
            color: white;
        }
        .level-1 {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
        }
        .level-2 {
            background: linear-gradient(45deg, #667eea, #764ba2);
        }
        .status-active {
            color: #10b981;
        }
        .status-inactive {
            color: #9ca3af;
        }
    </style>
</head>
<body class="max-w-md mx-auto pb-20">
    <!-- 顶部导航 -->
    <header class="bg-white py-4 px-6 shadow-sm">
        <div class="flex items-center relative">
            <a href="member-center.html" class="text-gray-600 absolute left-0 z-10">
                <i class="fas fa-chevron-left text-lg"></i>
            </a>
            <h1 class="text-xl font-semibold text-center flex-1">我的推荐</h1>
            <a href="#" class="text-blue-500 text-sm absolute right-0 z-10">分享</a>
        </div>
    </header>

    <!-- 推荐总览卡片 -->
    <div class="px-4 pt-4">
        <div class="recommend-card rounded-xl p-6 text-white shadow-lg">
            <div class="flex justify-between items-center mb-4">
                <div>
                    <p class="text-sm opacity-90">累计推荐</p>
                    <p class="text-3xl font-bold">40人</p>
                </div>
                <div class="text-right">
                    <p class="text-sm opacity-90">累计收益</p>
                    <p class="text-xl font-bold">¥2,560.00</p>
                </div>
            </div>
            <div class="flex justify-between text-sm opacity-90">
                <span>一级推荐: 12人</span>
                <span>二级推荐: 28人</span>
            </div>
        </div>
    </div>

    <!-- 推荐统计 -->
    <div class="px-4 mt-4">
        <div class="bg-white rounded-xl p-4 shadow-sm">
            <h3 class="text-lg font-medium text-gray-800 mb-3">推荐统计</h3>
            <div class="grid grid-cols-3 gap-4">
                <div class="text-center">
                    <div class="text-xl font-bold text-blue-500">12</div>
                    <div class="text-xs text-gray-500">一级推荐</div>
                </div>
                <div class="text-center">
                    <div class="text-xl font-bold text-purple-500">28</div>
                    <div class="text-xs text-gray-500">二级推荐</div>
                </div>
                <div class="text-center">
                    <div class="text-xl font-bold text-green-500">8</div>
                    <div class="text-xs text-gray-500">本月新增</div>
                </div>
            </div>
        </div>
    </div>

    <!-- 筛选标签 -->
    <div class="px-4 mt-4">
        <div class="flex space-x-2 overflow-x-auto pb-2">
            <button class="px-4 py-2 bg-blue-500 text-white rounded-full text-sm whitespace-nowrap">
                全部
            </button>
            <button class="px-4 py-2 bg-gray-100 text-gray-600 rounded-full text-sm whitespace-nowrap">
                一级推荐
            </button>
            <button class="px-4 py-2 bg-gray-100 text-gray-600 rounded-full text-sm whitespace-nowrap">
                二级推荐
            </button>
            <button class="px-4 py-2 bg-gray-100 text-gray-600 rounded-full text-sm whitespace-nowrap">
                活跃用户
            </button>
        </div>
    </div>

    <!-- 推荐用户列表 -->
    <div class="px-4 mt-4">
        <div class="bg-white rounded-xl shadow-sm overflow-hidden">
            <div class="p-4 border-b border-gray-100">
                <h3 class="text-lg font-medium text-gray-800">推荐用户</h3>
            </div>
            
            <!-- 用户列表 -->
            <div class="divide-y divide-gray-100">
                <!-- 一级推荐用户1 -->
                <div class="user-item p-4 hover:bg-gray-50">
                    <div class="flex items-center justify-between mb-3">
                        <div class="flex items-center">
                            <div class="relative">
                                <img src="http://www.dzgktf.com/templets/default/images/wtyt.jpg" 
                                     alt="用户头像" 
                                     class="w-12 h-12 rounded-full object-cover">
                                <div class="level-badge level-1">1</div>
                            </div>
                            <div class="ml-3">
                                <p class="font-medium text-gray-800">张小明</p>
                                <p class="text-sm text-gray-500">注册时间：2024-11-15</p>
                            </div>
                        </div>
                        <div class="text-right">
                            <p class="text-sm font-medium status-active">活跃</p>
                            <p class="text-xs text-gray-500">已下单 5次</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex items-center space-x-4">
                            <div class="text-center">
                                <p class="text-sm font-medium text-gray-800">¥1,200</p>
                                <p class="text-xs text-gray-500">累计消费</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium text-green-500">+¥120</p>
                                <p class="text-xs text-gray-500">推荐收益</p>
                            </div>
                        </div>
                        <button class="px-3 py-1 bg-blue-100 text-blue-600 rounded-full text-xs">
                            联系
                        </button>
                    </div>
                </div>

                <!-- 二级推荐用户1 -->
                <div class="user-item p-4 hover:bg-gray-50">
                    <div class="flex items-center justify-between mb-3">
                        <div class="flex items-center">
                            <div class="relative">
                                <img src="http://www.dzgktf.com/templets/default/images/wtyt.jpg" 
                                     alt="用户头像" 
                                     class="w-12 h-12 rounded-full object-cover">
                                <div class="level-badge level-2">2</div>
                            </div>
                            <div class="ml-3">
                                <p class="font-medium text-gray-800">王小花</p>
                                <p class="text-sm text-gray-500">注册时间：2024-11-25</p>
                                <p class="text-xs text-blue-500">通过 张小明 推荐</p>
                            </div>
                        </div>
                        <div class="text-right">
                            <p class="text-sm font-medium status-active">活跃</p>
                            <p class="text-xs text-gray-500">已下单 2次</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex items-center space-x-4">
                            <div class="text-center">
                                <p class="text-sm font-medium text-gray-800">¥600</p>
                                <p class="text-xs text-gray-500">累计消费</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium text-green-500">+¥30</p>
                                <p class="text-xs text-gray-500">推荐收益</p>
                            </div>
                        </div>
                        <button class="px-3 py-1 bg-blue-100 text-blue-600 rounded-full text-xs">
                            联系
                        </button>
                    </div>
                </div>

                <!-- 一级推荐用户2 -->
                <div class="user-item p-4 hover:bg-gray-50">
                    <div class="flex items-center justify-between mb-3">
                        <div class="flex items-center">
                            <div class="relative">
                                <img src="http://www.dzgktf.com/templets/default/images/wtyt.jpg" 
                                     alt="用户头像" 
                                     class="w-12 h-12 rounded-full object-cover">
                                <div class="level-badge level-1">1</div>
                            </div>
                            <div class="ml-3">
                                <p class="font-medium text-gray-800">李小红</p>
                                <p class="text-sm text-gray-500">注册时间：2024-11-20</p>
                            </div>
                        </div>
                        <div class="text-right">
                            <p class="text-sm font-medium status-active">活跃</p>
                            <p class="text-xs text-gray-500">已下单 3次</p>
                        </div>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex items-center space-x-4">
                            <div class="text-center">
                                <p class="text-sm font-medium text-gray-800">¥800</p>
                                <p class="text-xs text-gray-500">累计消费</p>
                            </div>
                            <div class="text-center">
                                <p class="text-sm font-medium text-green-500">+¥80</p>
                                <p class="text-xs text-gray-500">推荐收益</p>
                            </div>
                        </div>
                        <button class="px-3 py-1 bg-blue-100 text-blue-600 rounded-full text-xs">
                            联系
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 推荐规则说明 -->
    <div class="px-4 mt-4 mb-6">
        <div class="bg-blue-50 rounded-xl p-4">
            <h4 class="font-medium text-blue-800 mb-2">推荐规则</h4>
            <div class="text-sm text-blue-700 space-y-1">
                <p>• 一级推荐：用户首单完成，获得订单金额10%的奖励</p>
                <p>• 二级推荐：二级用户首单完成，获得订单金额5%的奖励</p>
                <p>• 推荐奖励包含积分和红包双重奖励</p>
                <p>• 推荐关系永久有效，持续获得收益</p>
            </div>
        </div>
    </div>

    <!-- 分享推荐 -->
    <div class="px-4 mb-6">
        <div class="bg-white rounded-xl shadow-sm p-4">
            <h3 class="text-lg font-medium text-gray-800 mb-3">分享推荐</h3>
            <div class="space-y-3">
                <div class="flex items-center justify-between p-3 border border-gray-200 rounded-lg">
                    <div class="flex items-center">
                        <div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-qrcode text-green-500"></i>
                        </div>
                        <div>
                            <p class="font-medium text-gray-800">我的推荐码</p>
                            <p class="text-sm text-gray-500">邀请好友注册使用</p>
                        </div>
                    </div>
                    <button class="px-4 py-2 bg-green-500 text-white rounded-lg text-sm">
                        生成
                    </button>
                </div>
                
                <div class="flex items-center justify-between p-3 border border-gray-200 rounded-lg">
                    <div class="flex items-center">
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-share-alt text-blue-500"></i>
                        </div>
                        <div>
                            <p class="font-medium text-gray-800">分享链接</p>
                            <p class="text-sm text-gray-500">分享给微信好友</p>
                        </div>
                    </div>
                    <button class="px-4 py-2 bg-blue-500 text-white rounded-lg text-sm">
                        分享
                    </button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
